/**
 * Created by think on 2017/1/1.
 */
//username = "皮皮";
// function sayHello(){
//    // console.log(username + "==="+ global.username);
//
//   //  console.error(new Error('Whoops, something bad happened'));
//
//     const name = 'Will Robinson';
//     //console.warn(`Danger ${name}! Danger!`);
// }
//
//sayHello();
//
//
//
//console.assert(true, 'does nothing');
//// OK
//console.assert(false, 'Whoops %s', 'didn\'t work');
//// AssertionError: Whoops didn't work


var mkutil = require("./mkutil");

console.log(mkutil.rand1(10,20));
console.log(mkutil.rand2(16));
console.log(mkutil.time("2017-01-01 12:12:12"));
console.log(mkutil.date("2017-01-01"));


const buf = Buffer.from('hello world', 'ascii');

// Prints: 68656c6c6f20776f726c64
console.log(buf.toString('hex'));

// Prints: aGVsbG8gd29ybGQ=
console.log(buf.toString('base64'));